//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.neurosky.thinkgear;

public class HammingWindow {
    private float[] a;
    private float[] b;

    public HammingWindow(int var1) {
        this.a = this.generateCoeffs(var1);
    }

    public float[] generateCoeffs(int var1) {
        float[] var2 = new float[var1];

        for(int var3 = 0; var3 < var1; ++var3) {
            var2[var3] = (float)(0.54D - 0.46D * Math.cos(6.283185307179586D * (double)var3 / (double)(var1 - 1)));
        }

        return var2;
    }

    public float[] applyCoeffs(float[] var1) {
        this.b = new float[var1.length];

        for(int var2 = 0; var2 < var1.length; ++var2) {
            this.b[var2] = var1[var2] * this.a[var2];
        }

        return this.b;
    }
}
